package com.chushouya.controller.order.api;

import com.chushouya.common.annotations.AuthSkip;
import com.chushouya.common.constant.ServiceType;
import com.chushouya.order.dto.admin.servicetime.ServiceTimeDTO;
import com.chushouya.order.service.api.VisitTimeApiService;
import com.general.framework.core.schema.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 上门时间
 */
@RestController
@RequestMapping(ServiceType.API + "/visitTime")
@Api(tags = ServiceType.API + "上门时间")
public class VisitTimeApiController {

    @Resource
    private VisitTimeApiService visitTimeApiService;

    @GetMapping("serviceTimeList")
    @ApiOperation("上门时间")
    @AuthSkip
    public Response<List<ServiceTimeDTO>> serviceTimeList() {
        return Response.success(visitTimeApiService.serviceTimeList());
    }
}
